<!DOCTYPE html>
<html>
<head>
    <title>签到页面</title>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link rel="stylesheet" href="/js/bootstrap-4.1.1-dist/css/bootstrap.min.css">
    <script src="/js/jquery/jquery.min.js"></script>
    <script src="/js/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
    <script src="/js/plugins/jrender/jrender.min.js"></script>
    <link rel="stylesheet" href="/css/font/css/font-awesome.min.css"/>
    <link rel="stylesheet" href="/css/reset.css"/>
    <link rel="stylesheet" href="/css/userTravels.css"/>
    <link rel="stylesheet" href="/js/plugins/dialog2/dialog.css"/>
    <script src="/js/plugins/dialog2/dialog.min.js"></script>
    <script src="/js/common.js"></script>
    <script src="/js/checkLogin.js"></script>
    <script src="/js/queryAndBlank.js"></script>
    <style type="text/css">
        .setbg{
            background: url(/upload/72.jpg);
        }
        .setbg1{
            background: url(/upload/74.jpg);
        }
        span{
            color:#f1b0b7;
            font-size: 16px;
        }
        p{
            color: orchid;
            font-size: 14px;
        }
        h6{
            color: darkorange;
            font-size: 25px;
        }
        h7{
            color: red;
        }
    </style>

    <script type="text/javascript">
        window.Env = {"hasDakaToday":true,"CNZZID":30081550,"IS_MOBILE":true,"WWW_HOST":"www.mafengwo.cn","IMG_HOST":"images.mafengwo.net","W_HTTP":"https:\/\/w.mafengwo.cn","P_HOST":"passport.mafengwo.cn","P_HTTP":"https:\/\/passport.mafengwo.cn","PAGELET_HTTP":"https:\/\/pagelet.mafengwo.cn","JS_HOST":"js.mafengwo.net","TONGJI_HOST":"tongji.mafengwo.cn","UID":95340923,"CSTK":"5327eec3d8aa6109b12355c9fd3ba785_441026418ae6aab629884c4406e27f9c","GOOGLE_MAP_KEY":"AIzaSyD-Su0x_rPy1xehlMBcMyTqWkU49Bk53nQ","MOBILE_BINDED":true};
    </script>
    <link href="https://css.mafengwo.net/css/cv/mobile+css+head:mobile+css+ui^YVw^1550829726.css" rel="stylesheet" type="text/css"/>

    <script>
        $(function () {

            //回显当前用户的签到信息
            $.get(baseUrl+"/signs",{userId:user.id},function (data) {
                console.log(data);
                var constant=data.constant;
                $(".setbg1 #lastTime").html(data.createTime)
                $(".daka-days h7[name='constant']").html(data.constant);
                $(".daka-days h7[name='total']").html(data.total);
                var num=7-constant%7;
                $(".daka-days h7[name='surplus']").html(num);
            })

            //点击签到按钮的时候
            $("#signBtns").click(function () {

                $.ajax({
                    url:baseUrl+'/signs/'+user.id,
                    method:"put",
                    success:function (data) {
                        if (data.success) {
                            $(document).dialog({
                                content: '签到成功',
                            });
                            setTimeout(function () {
                                window.location.reload();
                            }, 2000);
                        }else{
                            $(document).dialog({
                                content:data.errorMsg,
                            });
                        }
                    }
                })
            })
            //回显积分
            $.get(baseUrl+"/integrals",{userId:user.id},function (data) {
                $(".daka-days h7[name='surplus1']").html(data.integral);
            })
        })
    </script>


</head>
<body background="/upload/15.jpg"></body>
<body>
<link href="https://css.mafengwo.net/mobile/css/daka2016.css?1552302233" rel="stylesheet" type="text/css"/>
<!--点击回到上一页-->
<div class="search-head">
    <div class="row nav-search">
        <div class="col">
            <a href="/mine/profiles.html">
                <span><i class="fa fa-chevron-left"></i></span>
            </a>
        </div>
        <div class="col">
            <h7>签到界面</h7>
        </div>
        <div class="col"></div>
    </div>
</div>
<div class="wrapper">
    <div  class="setbg1" >
    <button class="btn" id="signBtns" >签到</button>
        <em><strong><span>上一次签到时间:<span id="lastTime" ></span></span></strong></em>
    </div>
    <div id="daka-box" data-uid="95340923" data-totaldays="2" class="daka-box main-box setbg" >
        <!-- 打卡天数 -->
    <div id="daka-days" class="daka-days" >
        <em><p>已连续打卡<h7 name="constant">0</h7>天</em></p>
        <em><p>总打卡<h7 name="total">0</h7>天</p></em>
        <em><p>还有<h7 name="surplus">7</h7>天就可以领取50积分了</p></em>
        <em><p>当前<h7 name="surplus1">0</h7>积分了</p></em>
    </div>
    <!-- 到达城市 -->
    <div id="city-wrap" class="city-wrap normal">
        <div class="city-box change">
            <div class="city city1">
                <div class="city-qian"><img src="/upload/71.jpg" alt=""></div>
            </div>
        </div>
    </div>


    <div id="mdd-wrap" class="mdd-wrap">
        <div class="mdd-box">
            <em><div class="mdd mdd1"><h6>所在地:成都</h6></div></em>
        </div>
    </div>

    <!-- 公路 -->
    <div class="road" style="background-color:darkgrey;">
        <div class="road-green">
            <div class="roll-wrap">
                <div class="roll">
                    <img src="https://n2-q.mafengwo.net/s9/M00/8C/7B/wKgBs1cz8ZWAc_7VAAB04Nng9Sc439.png" alt="">
                    <img src="https://n2-q.mafengwo.net/s9/M00/8C/7B/wKgBs1cz8ZWAc_7VAAB04Nng9Sc439.png" alt="">
                </div>
            </div>
        </div>
        <div class="road-zebra">
            <div class="roll-wrap">
                <div class="roll">
                    <img src="https://n2-q.mafengwo.net/s9/M00/8C/7F/wKgBs1cz8Z6AaK2EAAAGyxxAYUY808.png" alt="">
                    <img src="https://n2-q.mafengwo.net/s9/M00/8C/7F/wKgBs1cz8Z6AaK2EAAAGyxxAYUY808.png" alt="">
                </div>
            </div>
        </div>
        <div class="car">
            <img src="" alt="">
        </div>
        <div class="car_list" style="display:none;">
            <img src="https://b1-q.mafengwo.net/s9/M00/8C/42/wKgBs1cz8SKAKcXsAAAmfPxeR8Q138.png" alt="">
            <img src="https://b1-q.mafengwo.net/s9/M00/8C/44/wKgBs1cz8SmACZ5HAAAvjXWj_Ms496.png" alt="">
            <img src="https://n3-q.mafengwo.net/s9/M00/8C/46/wKgBs1cz8S6AMGIKAAAvA3Nbt_k153.png" alt="">
            <img src="https://n1-q.mafengwo.net/s9/M00/8C/4C/wKgBs1cz8TiAQ6DcAAAu8QHVzic539.png" alt="">
            <img src="https://n4-q.mafengwo.net/s9/M00/8C/50/wKgBs1cz8T6AZaGTAAAvQ5RaMbk983.png" alt="">
            <img src="https://b3-q.mafengwo.net/s9/M00/8C/53/wKgBs1cz8USANhIyAAAuxUTmTCQ693.png" alt="">
        </div>
    </div>




</div>

<div id="daka-album" class="album-pop" style="background-color: #67ccff; display: none;"></div>
<!-- 浮层->分享 -->
<div id="share-pop" class="share-pop" style="background-color: #67ccff; display: none;">
    <div class="share-pop-mask"></div>
    <div class="share-load"></div>

    <div class="envelope-hou"></div>

    <div class="daka-box envelope-pic" style="background-color: #67ccff;">
        <img id="share_img" src=""/>

        <!-- 关闭 -->
        <div class="share-close"></div>

    </div>

    <div class="envelope-qian"></div>

    <div class="e-share-wrap">
        <div class="e-share">
            <a href="javascript:void(0);" class="weibo"><i></i><span>新浪微博</span></a>
        </div>
    </div>

</div>


<!-- 浮层->公告 -->
</div>


<script language="javascript" src="https://js.mafengwo.net/js/cv/js+client+deprecated_mfwappsdk_0_x:js+client+mfwappsdk:mobile+js+flexible:mobile+js+zepto.mix.min:mobile+js+swiper.min:mobile+js+daka+index^YlZa^1557457640.js" type="text/javascript" crossorigin="anonymous"></script>


<script language="javascript" type="text/javascript">
    if (typeof M !== "undefined" && typeof M.loadResource === "function") {
        M.loadResource("https://js.mafengwo.net/js/cv/mobile+js+BindMobilePop:mobile+js+ALogin:js+ACnzzGaLog:js+ARecruit:js+ALazyLoad:mobile+js+wakeApp:mobile+js+omc.global^YlRb^1558975785.js");
    }
</script>


</div>
</body>
</html>
